package com.yfree.views.selectdate;

import java.text.DecimalFormat;
import java.util.Calendar;

public class CalendarTime {

	public static String getFormatTime(Calendar c) {
		String parten = "00";
		DecimalFormat decimal = new DecimalFormat(parten);
		Calendar calendar = c;
		int year = calendar.get(Calendar.YEAR);
		int month = calendar.get(Calendar.MONTH);
		int day = calendar.get(Calendar.DATE);
		return year + "-" + decimal.format(month + 1) + "-"
				+ decimal.format(day);
	}
}
